<template>
	<uni-pagination v-show="total>0" class="center" show-icon="true" :total="total" :current="current" @change="change"></uni-pagination>
</template>

<script>
	import uniPagination from '@/components/uni-pagination/uni-pagination.vue'

	export default {
		components: {
			uniPagination
		},
		data() {
			return {
				current: 1,
				total: 0
			}
		},
		methods: {
			change(e) {
				this.current = e.current;
				this.$emit('update')
			}
		}
	}
</script>

<style scoped>
	.center {
		margin: 0 auto;
	}
</style>
